.weather-forecast-panel {
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  .top-wrap{
    width: 100%;
    height: 630px;
    margin-bottom: 20px;
    .top-title-wrap{
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
      .tab-selector {
        display: flex;
        justify-content: left;
        .tab-item {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 105px;
          height: 30px;
          border: 1px solid #3A4E74;
          cursor: pointer;
          transition: all 0.3s ease;
          text-align: center;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          font-size: 14px;
        }
        .tab-item:first-child{
          border-radius: 4px 0 0 4px;
          border-right: none;
        }
        .tab-item:last-child{
          border-radius: 0 4px 4px 0;
          border-left: none;
        }
        .isActive{
          color: rgba(255,255,255,1);
          border: 1px solid #43c3f5 !important;
          background: linear-gradient(to bottom, rgba(67,195,245, 0) 35%, rgba(67,195,245, 1));
        }
        .unActive{
          border: 1px solid #3A4E74 !important;
          background: rgba(5, 18, 34, 0.20);
          color: rgba(255,255,255,0.9);
        }

      }
    }
  }
  .content-wrap{
    height: calc(100% - 62px);
    width: calc(100% - 10px);
    background: linear-gradient( 180deg, rgba(20,25,31,0.6) 0%, rgba(60,66,73,0.6) 100%), linear-gradient( 178deg, rgba(9,11,13,0) 0%, #26394D 100%), radial-gradient( 185% 43% at 53% -3%, rgba(166,213,255,0.5) 0%, rgba(166,209,255,0) 24%, rgba(179,212,255,0) 100%);
    border: 1px solid rgba(77,89,102,0.25);
    border-radius: 4px;
    padding: 20px 15px 0;
    box-sizing: border-box;
    .air-area{
      height: 353px;
      // 天气预报时段
      .weather-periods {
        display: flex;
        justify-content: left;
        .weather-period {
          flex: 1;
          position: relative;
          display: flex;
          flex-direction: column;
          align-items: center;
          cursor: pointer;
          transition: all 0.3s ease;
          // 时间
          .period-time {
            position: relative;
            // 36px × 20px, SourceHanSansSC Medium, 16px, #FFFFFF, 居中对齐, 行高20px
            width: 36px;
            height: 20px;
            font-family: SourceHanSansSC, sans-serif;
            font-style: normal;
            line-height: 20px;
            text-align: center;
            white-space: nowrap;
            margin-bottom: 30px; // 341px - 300px = 41px (时间到图标的距离)
            transition: all 0.3s ease;
          }

          // 天气图标
          .period-icon {
            position: relative;
            margin-bottom: 18px; // 369px - 341px - 28px = 18px (图标到天气描述的距离)

            .weather-icon {
              // 28px × 28px
              width: 28px;
              height: 28px;
              border-radius: 50%;
              transition: all 0.3s ease;

              &.gradient-icon {
                // 渐变图标: linear-gradient(180deg, #FFFFFF 0%, #FFEC91 100%)
                // 用于晴天
              }

              &.image-icon {
                background-size: contain;
                background-repeat: no-repeat;
                background-position: center;
                // 用于雨天、多云等
              }

              &.default-icon {
                background: rgba(255, 255, 255, 0.3);
                border: 2px solid rgba(255, 255, 255, 0.5);
              }
            }
          }

          // 天气描述
          .period-weather {
            position: relative;
            // 32px × 20px, SourceHanSansSC Normal, 16px, rgba(255,255,255,0.8), 居中对齐, 行高20px
            width: 32px;
            height: 20px;
            font-family: SourceHanSansSC, sans-serif;
            font-style: normal;
            line-height: 20px;
            text-align: center;
            white-space: nowrap;
            transition: all 0.3s ease;
          }


          &:active {
            transform: translateY(-1px);
          }
        }
      }
    }
    .item-head{
      display: flex;
      align-items: center;
      .head-round{
        width: 17px;
        height: 17px;
        background-size: cover;
        margin-right: 5px;
      }
      .head-title{
        font-family: SourceHanSansSC, SourceHanSansSC;
        font-weight: 500;
        font-size: 16px;
        color: #6FBDFF;
      }
      .head-line{
        flex: 1;
        height: 2px;
        background: linear-gradient( 90deg, rgba(0,139,255,0) 0%, #008BFF 100%);
      }
      .head-right{
        width: 28px;
        height: 24px;
        background-size: cover;
      }
      .plus-icon{
        width: 24px;
        height: 24px;
        background-size: cover;
      }

    }
    .img-area{
      margin-top: 15px;
      height: 141px;
      width: 100%;
      border: 1px solid rgba(255,255,255,0.2);
    }
    .alert-area{
      width: 100%;
      height: 50px;
      position: relative;
      display: flex;
      align-items: center;
      user-select: none;
      cursor: pointer;
      transition: all 0.3s ease;
      overflow: hidden;
      background: rgba(66,106,144,0.29);
      margin: 20px 0;
      .horn-item{
        position: absolute;
        width: 8px;
        height: 8px;
      }
      .left-top{
        top: 0;
        left: 0;
        border-left: 2px solid #008BFF;
        border-top: 2px solid #008BFF;
      }
      .right-top{
        top: 0;
        right: 0;
        border-right: 2px solid #008BFF;
        border-top: 2px solid #008BFF;
      }
      .right-bottom{
        bottom: 0;
        right: 0;
        border-right: 2px solid #008BFF;
        border-bottom: 2px solid #008BFF;
      }
      .left-bottom{
        bottom: 0;
        left: 0;
        border-left: 2px solid #008BFF;
        border-bottom: 2px solid #008BFF;
      }
      // 背景容器
      .alert-background {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        // 460px × 50px, rgba(66,106,144,0.29)
        background: var(--background-color);
        opacity: var(--background-opacity);
        border-radius: 4px;
        transition: all 0.3s ease;
      }

      // 预警图标
      .alert-icon {
        position: absolute;
        // 位置 3606px 903px (相对于3437px, 894px): 3606-3437=169px, 903-894=9px
        left: 169px;   // 169px from left edge
        top: 9px;      // 9px from top edge
        // 大小 32px 32px
        width: 32px;
        height: 32px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        opacity: var(--icon-opacity);
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 2;

        &:active {
          transform: scale(1.05);
        }
      }

      // 预警文字
      .alert-text {
        position: absolute;
        // 位置 3646px 907px (相对于3437px, 894px): 3646-3437=209px, 907-894=13px
        left: 209px;   // 209px from left edge
        top: 13px;     // 13px from top edge
        // 大小 83px 24px
        width: 83px;
        height: 24px;
        // SourceHanSansSC Medium, 16px, #00FFF1, 左对齐, 行高24px, 字间距0.57px
        font-family: SourceHanSansSC, sans-serif;
        font-style: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 2;


        &:active {
          transform: scale(1);
        }
      }
    }
    // 表格区域
    .table-area {
      height: 250px;
      // 表头
      .table-header {
        width: 100%;
        display: flex;
        align-items: center;
        height: 40px;
        .header-cell {
          // 字体思源黑体 Medium, 16px, #56A5FF, 行高16px, 居中对齐
          font-family: SourceHanSansSC, sans-serif;
          font-weight: 500;
          font-size: 16px;
          line-height: 16px;
          text-align: center;
          font-style: normal;
          text-transform: none;
        }
      }
      // 表格主体
      .table-body {
        width: 100%;
        height: 100px;
        overflow-y: auto;
        .table-row:nth-child(2n){
          background: rgba(16,85,163,0.18);
        }
        .table-row {
          display: flex;
          align-items: center;
          // Frame 26备份 17: 460px 40px, rgba(16,85,163,0.18)
          width: 100%;
          height: 40px;
          cursor: pointer;
          transition: all 0.3s ease;

          &:active {
            transform: translateX(0);
          }

          .table-cell {
            // 字体思源黑体 Medium, 16px, #56A5FF, 行高16px, 居中对齐
            font-family: SourceHanSansSC, sans-serif;
            font-weight: 500;
            font-size: 14px;
            text-align: center;
            font-style: normal;
            text-transform: none;
          }
        }
      }
    }
  }
  .bottom-wrap{
    height: 429px;
  }
  .title-wrap{
    width: 100%;
    background-size: 100% 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 15px 0;
    margin-bottom: 3px;
    .title-str{
      display: flex;
      align-items: center;
      position: relative;
      height: 30px;
      overflow: hidden;
      padding-top: 3px;
      .title, .sen-title {
        font-family: YouSheBiaoTiHei;
        font-size: 19px;
        font-weight: bold;
        background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 40%, #0077ef 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        box-sizing: border-box;
        transition: all 0.3s ease;
      }
      .sen-title{
        position: absolute;
        bottom: -16px;
        opacity: 0.2;
        display: inline-block; /* 使 transform 属性有效 */
        transform: scaleY(-1); /* 镜像效果，水平翻转 */
      }
      .subtitle {
        font-family: AzonixRegular;
        text-transform: uppercase;
        width: 70%;
        box-sizing: border-box;
        transition: all 0.3s ease;
        font-size: 14px;
        color: rgba(255,255,255,0.5);
        margin-left: 15px;
        letter-spacing: 2px;
        white-space: normal;
        line-height: 14px;
      }
      .subtitle:hover {
        opacity: 0.6 !important;
      }
    }
    .icon{
      width: 24px;
      height: 23px;
      background-size: cover;
    }
  }

  .bottom-line{
    border: 2px solid;
    border-image: linear-gradient(225deg, rgba(117, 170, 202, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 1), rgba(117, 170, 202, 0)) 2 2;
  }



  &:active {
    transform: translateY(0);
  }

  // 主题样式
  &.dark {
    // 默认深色主题
  }

  &.light {
    .forecast-tab {
      &.active .tab-text {
        color: rgba(0, 0, 0, 0.9) !important;
        text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.8) !important;
      }

      &.inactive .tab-text {
        color: rgba(0, 0, 0, 0.7) !important;
        text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.6) !important;
      }
    }

    .period-time {
      color: rgba(0, 0, 0, 0.9) !important;
      text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.8) !important;
    }

    .period-weather {
      color: rgba(0, 0, 0, 0.7) !important;
      text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.6) !important;
    }

  }


  // 焦点可访问性
  &:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
  }

  .forecast-tab:focus,
  .weather-period:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
  }

  // 数据状态
  &.loading {
    opacity: 0.7;
    pointer-events: none;

    .weather-periods {
      animation: pulse 1.5s ease-in-out infinite;
    }

    &::after {
      content: '';
      position: absolute;
      top: 50%;
      right: 8px;
      width: 12px;
      height: 12px;
      margin-top: -6px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: #FFFFFF;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      z-index: 10;
    }
  }

  &.warning {
    .period-time {
      color: #FFC107 !important;
      text-shadow: 0px 0px 6px #FF8F00 !important;
    }
  }

  &.danger {
    .period-time {
      color: #F44336 !important;
      animation: dangerPulse 1s ease-in-out infinite;
      text-shadow: 0px 0px 8px #D32F2F !important;
    }
  }

  &.success {
    .period-time {
      color: #4CAF50 !important;
      text-shadow: 0px 0px 6px #2E7D32 !important;
    }
  }

  &.disabled {
    pointer-events: none;
    opacity: 0.5;

    * {
      filter: grayscale(1);
    }
  }

  // 动画关键帧
  @keyframes pulse {
    0%, 100% {
      opacity: 0.6;
    }
    50% {
      opacity: 1;
    }
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes dangerPulse {
    0%, 100% {
      transform: scale(1);
      filter: brightness(1);
    }
    50% {
      transform: scale(1.05);
      filter: brightness(1.3);
    }
  }

  // 特殊效果
  &.enhanced {
    &::before {
      content: '';
      position: absolute;
      top: -2px;
      left: -2px;
      right: -2px;
      bottom: -2px;
      background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      border-radius: 8px;
      z-index: -1;
      animation: borderFlow 3s linear infinite;
    }

    .period-time {
      animation: timeGlow 2s ease-in-out infinite;
    }

    .weather-icon {
      animation: iconGlow 2s ease-in-out infinite;
    }
  }

  @keyframes borderFlow {
    0% {
      transform: rotate(0deg);
      opacity: 0.3;
    }
    100% {
      transform: rotate(360deg);
      opacity: 0.3;
    }
  }

  @keyframes timeGlow {
    0%, 100% {
      text-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
    }
    50% {
      text-shadow: 0px 0px 12px rgba(255, 255, 255, 0.8), 0px 0px 20px rgba(255, 255, 255, 0.4);
    }
  }

  @keyframes iconGlow {
    0%, 100% {
      filter: brightness(1);
      box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
    }
    50% {
      filter: brightness(1.3);
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
  }

  // 错误状态
  &.error {
    &::after {
      content: '数据异常';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(255, 0, 0, 0.9);
      color: white;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 500;
      z-index: 15;
    }

    .weather-periods {
      filter: grayscale(1) brightness(0.5);
    }
  }

  // 更新状态
  &.updating {
    .weather-periods {
      animation: updateAnimation 0.8s ease-in-out;
    }

    .forecast-tabs {
      animation: tabUpdate 1s ease-in-out;
    }
  }

  @keyframes updateAnimation {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.02);
      opacity: 0.7;
      filter: brightness(1.3);
    }
  }

  @keyframes tabUpdate {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.7;
      filter: brightness(1.2);
    }
  }

  // 天气状态
  &.sunny {
    .weather-icon.gradient-icon {
      box-shadow: 0 0 15px rgba(255, 236, 145, 0.8) !important;
      animation: sunnyGlow 3s ease-in-out infinite;
    }
  }

  &.rainy {
    .weather-icon.image-icon {
      filter: hue-rotate(200deg) brightness(1.1) !important;
      animation: rainyPulse 2s ease-in-out infinite;
    }
  }

  &.cloudy {
    .weather-icon.image-icon {
      filter: brightness(0.9) contrast(1.1) !important;
      animation: cloudyDrift 4s ease-in-out infinite;
    }
  }

  @keyframes sunnyGlow {
    0%, 100% {
      transform: scale(1);
      filter: brightness(1);
    }
    50% {
      transform: scale(1.1);
      filter: brightness(1.4);
    }
  }

  @keyframes rainyPulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.8;
      filter: hue-rotate(200deg) brightness(1.3) !important;
    }
  }

  @keyframes cloudyDrift {
    0%, 100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(2px);
    }
  }

  // 预报准确度状态
  &.high-accuracy {
    .period-time {
      animation: accuracyGlow 2s ease-in-out infinite;
    }
  }

  &.low-accuracy {
    .period-time {
      opacity: 0.7;
      animation: uncertaintyBlink 3s ease-in-out infinite;
    }

    .weather-icon {
      opacity: 0.8;
      filter: saturate(0.7);
    }
  }

  @keyframes accuracyGlow {
    0%, 100% {
      text-shadow: 0px 0px 4px rgba(76, 175, 80, 0.5);
    }
    50% {
      text-shadow: 0px 0px 8px rgba(76, 175, 80, 0.8);
    }
  }

  @keyframes uncertaintyBlink {
    0%, 100% {
      opacity: 0.7;
    }
    50% {
      opacity: 0.5;
    }
  }

  // 实时更新状态
  &.realtime {
    .forecast-tabs::after {
      content: '';
      position: absolute;
      top: 4px;
      right: 4px;
      width: 8px;
      height: 8px;
      background: #4CAF50;
      border-radius: 50%;
      animation: realtimePulse 2s ease-in-out infinite;
      z-index: 10;
    }

    .weather-periods {
      animation: realtimeUpdate 3s ease-in-out infinite;
    }
  }

  @keyframes realtimePulse {
    0%, 100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.6;
      transform: scale(1.3);
    }
  }

  @keyframes realtimeUpdate {
    0%, 100% {
      filter: brightness(1);
    }
    50% {
      filter: brightness(1.1) saturate(1.1);
    }
  }
  @media screen and (max-width: 1920px) {
    transform: scale(0.4862); // 1920/3952 ≈ 0.4862
    transform-origin: top left;
  }

  @media screen and (max-width: 1080px) {
    transform: scale(0.2733); // 1080/3952 ≈ 0.2733
    transform-origin: top left;
  }

  @media screen and (min-width: 5120px) {
    transform: scale(1.7778); // 5120/3952 ≈ 1.2955
    transform-origin: top left;
  }
}
